import { request } from "@/utils/request.js"

// 微信登录
export const wxLogin = (params) => {
	return request("/wxlogin", "POST", params)
}
// 修改用户信息
export const updateUserAPI = (params) => {
	return request("/user", "POST", params)
}
// 文生文
export const createCompletionsAPI = (params) => {
	return request("/create-completions", "POST", params, true)
}
// 文生图
export const createImagesAPI = (params) => {
	return request("/create-images", "POST", params)
}
// 获取阿里云token
export const getAliTokenAPI = () => {
	return request('/alitoken', 'GET')
}
// 存储聊天记录
export const saveChatHistoryAPI = (params) => {
	return request('/save-chat-history', 'POST', params)
}
// 获取用户的全部聊天记录列表
export const getChatListAPI = () => {
	return request('/fetch-chat-history', 'GET')
}
// 点击聊天列表获取对应的聊天内容
export const getChatHistoryAPI = (params) => {
	return request('/only-chat-history', 'GET', params)
}

// 微信支付
export const wxPayAPI = (params) => {
	return request('/pay', 'POST', params)
}

// 获取订单列表
export const getOrderListAPI = () => {
	return request('/order', 'GET')
}
// 获取用户积分
export const getPointsAPI = () => {
	return request('/points', 'GET')
}